package com.gcxy.dto.student;

import com.gcxy.constant.StringConst;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
 * Copyright (C), 2024-2024, BUG闭退！
 * Author: Huang先森
 * Date: 2024/7/29 16:17
 * FileName: StudentInfoDTO
 * Description:
 */
@Data
public class AddStudentInfoDTO {

    @NotBlank(message = "用户学号不能为空")
    @Length(max = StringConst.STUDENT_ACCOUNT_LENGTH, message = "用户账号最多15个字")
    @Pattern(regexp = "^[A-Za-z0-9]+$", message = "用户账号只能输入英文或者数字")
    @ApiModelProperty("学号")
    private String studentAccount;

    @NotBlank(message = "用户姓名不能为空")
    @Length(max = StringConst.USER_NAME_LENGTH, message = "用户姓名最多10个字")
    @Pattern(regexp = "^[\\u4e00-\\u9fa50-9]+$", message = "用户姓名只能输入中文或者数字")
    @ApiModelProperty("姓名")
    private String studentName;

    @ApiModelProperty("组织ID")
    private Integer agencyId;

    @NotNull(message = "学期不能为空")
    @ApiModelProperty("学期Id")
    private Integer semesterId;

    @Valid
    @NotNull(message = "项目列表不能为空")
    @ApiModelProperty("项目列表")
    private List<String> projectList;

    @NotBlank(message = "岗位不能为空")
    @Length(max = 20, message = "岗位名称最多20个字")
    @ApiModelProperty("岗位")
    private String positionName;

    @NotBlank(message = "班级信息不能为空")
    @Length(max = 20, message = "班级信息最多20个字")
    @ApiModelProperty("班级信息")
    private String className;

    @ApiModelProperty("实际指导教师Id")
    private Integer practicalTeacherId;

    @NotNull(message = "名义指导教师不能为空")
    @ApiModelProperty("名义指导教师Id")
    private Integer honoraryTeacherId;
}
